package com.sanri.buildingblock.exportcenter.enums;

/**
 * @description:
 * @author: huangzhengri
 * @time: 2023-04-14 15:04
 */
public enum Sync {
    /**
     * 异步
     */
    ASYNC(1),
    /**
     * 同步
     */
    SYNC(2);

    private final int code;

    Sync(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static Sync getSyncByCode(int code){
        if (code == 1){
            return ASYNC;
        }
        return SYNC;
    }
}
